<template>
  <div class="dashboard-container">
    <div class="app-container">
      <!-- 自定义组件，标题 -->
      <PageTitle :show-before="true">
        <template v-slot:before>
          <h2>企业注销申请</h2>
        </template>
      </PageTitle>
      <div class="tip">
        <p>
          注销账号后删除会员所有数据，不可恢复。如需留存会员数据，请点击备份，备份会员数据。
        </p>
      </div>
      <el-row type="flex">
        <el-col :span="4">
          <el-select v-model="model" placeholder="公司名称">
            <el-option
              v-for="item in options"
              :key="item.id"
              :label="item.name"
              :value="item.id"
            >
            </el-option>
          </el-select>
        </el-col>
        <el-col :span="6">
          <el-row type="flex">
            <el-input placeholder="请输入搜索内容"></el-input>
            <el-button type="primary">
              <i class="el-icon-search"></i>
            </el-button>
          </el-row>
        </el-col>
      </el-row>
      <!-- 数据表 -->
      <el-table
        v-loading="downloadLoading"
        ooltip-effect="dark"
        border
        :data="list"
        max-height="500px"
        style="margin-top: 20px"
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="55" fixed />
        <el-table-column
          label="ID"
          align="center"
          sortable
          width="60"
          prop="id"
          fixed
        />
        <el-table-column label="简历名称" align="center" prop="contact" fixed />
        <el-table-column
          label="注册时间"
          align="center"
          prop="regtime"
          width="130"
          fixed
        />
        <el-table-column
          label="手机号"
          align="center"
          prop="mobile"
          width="180"
        />
        <el-table-column
          label="处理状态"
          align="center"
          prop="practice_sum"
          width="120"
        >
          <template slot-scope="scope">
            <el-tag :type="scope.row.status ? 'success' : 'danger'">{{
              scope.row.status ? "已处理" : "未处理"
            }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column
          label="申请时间"
          align="center"
          prop="regtime"
          width="220"
        />
        <el-table-column
          label="处理时间"
          prop="is_practice"
          width="120"
          align="center"
        >
          <template v-if="row.comid > 0" slot-scope="{ row }">
            <el-tag :type="row.is_practice | statusFilter">
              {{ row.is_practice | isPracticeType }}
            </el-tag>
          </template>
        </el-table-column>
        <el-table-column
          :label="$t('table.actions')"
          width="150"
          align="center"
          fixed="right"
        >
          <template>
            <el-button
              type="danger"
              size="mini"
              :disabled="!checkPermission('Intern-show')"
              >删除</el-button
            >
          </template>
        </el-table-column>
      </el-table>
      <el-row :gutter="10" style="margin-top: 10px;">
        <el-col :span="10">
          <el-button type="primary" size="small">全选/反选</el-button>
          <el-button type="danger" size="small">删除</el-button>
        </el-col>
        <el-col :span="14">
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="currentPage4"
            :page-sizes="[10, 20, 50, 100]"
            :page-size="10"
            layout="total, sizes, prev, pager, next, jumper"
            :total="255"
            style="text-align: right"
          >
          </el-pagination>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      downloadLoading: false,
      list: [
        {
          id: 3,
          uid: 1281,
          addtime: 1712578461,
          status: 1,
          handlertime: 1712624194,
          regtime: "2024-04-06",
          companyname: "",
          mobile: "15058407357",
          contact: "傅梦萍",
          utype: 2,
          is_backups: 1,
        },
        {
          id: 1,
          uid: 445,
          addtime: 1710727200,
          status: 1,
          handlertime: 1710824561,
          regtime: "2024-03-02",
          companyname: "",
          mobile: "13306678731",
          contact: "孙",
          utype: 2,
          is_backups: 1,
        },
      ],
      options: [{ id: 1, name: "简历名称" }],
    };
  },
};
</script>

<style lang="scss" scoped>
.tip {
  padding: 8px 16px;
  background-color: #fdf6ec;
  border-radius: 4px;
  border-left: 5px solid #f9c77c;
  margin: 0 0 20px;
  p {
    font-size: 14px;
    color: #e6a23c;
    line-height: 1em;
  }
}
</style>
